﻿<Window x:Class="DbStreamConverter.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="DB Stream Converter" Height="600" Width="900">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Menu VerticalAlignment="Top" HorizontalAlignment="Stretch">
            <MenuItem Header="File">
                <MenuItem Header="New" Command="{Binding AddMappingCommand}"/>
                <MenuItem Header="Open" Command="{Binding LoadCommand}"/>
                <MenuItem Header="Save" Command="{Binding OverWriteCommand}"/>
                <MenuItem Header="Save As" Command="{Binding SaveCommand}"/>
                <MenuItem Header="Close" Command="{Binding CloseCommand}"/>
                <Separator></Separator>
                <MenuItem Header="Exit" Command="{Binding ExitCommand}"/>
            </MenuItem>
            <MenuItem Header="Convert">
                <MenuItem Header="Execute" Command="{Binding ExecuteCommand}"/>
                <MenuItem Header="Cancel" Command="{Binding CancelCommand}"/>
                <MenuItem Header="Edit RuleSet" Command="{Binding EditRuleSetCommand}"/>
                <MenuItem Header="Remove RuleSet" Command="{Binding RemoveRuleSetCommand}"/>
                <MenuItem Header="Export Data" Command="{Binding ExportDataCommand}"/>
                <MenuItem Header="Drop Temp Table" Command="{Binding DropTempTableCommand}"/>
            </MenuItem>
        </Menu>
        <StackPanel Margin="5"  Grid.Row="1">
            <ContentControl x:Name="MainContent" VerticalAlignment="Stretch">
            </ContentControl>
        </StackPanel>
        <TabControl x:Name="Tabs" Grid.Row="2" ItemsSource="{Binding Mappings}" SelectedItem="{Binding SelectedMapping}" Margin="5" >
            <TabControl.ItemContainerStyle>
                <Style TargetType="TabItem">
                    <Setter Property="Header" Value="{Binding Title}"/>
                    <Setter Property="Content" Value="{Binding Content}"/>
                </Style>
            </TabControl.ItemContainerStyle>
        </TabControl>

    </Grid>
</Window>
